package org.lib.mysqlhello.user.controller;

import org.lib.mysqlhello.common.ResultVO;
import org.lib.mysqlhello.user.controller.dto.AddUserDTO;
import org.lib.mysqlhello.user.controller.dto.UpdateUserDTO;
import org.lib.mysqlhello.user.entity.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * User增删改查接口
 * @author ben
 * @date 2021-08-21 23:10:17 CST
 */
public interface UserCrudFacade {

	@PostMapping(value="add")
	ResultVO<Long> addUser(AddUserDTO dto);
	
	@PostMapping(value="del")
	ResultVO<Boolean> delUser(Long id);

	@PostMapping(value="updateById")
	ResultVO<Boolean> updateUser(UpdateUserDTO dto);
	
	@GetMapping(value="getById")
	ResultVO<User> getUserById(Long id);
	
}
